installDir="/usr/local"

[ -e $installDir ] || mkdir $installDir
[ -e ${installDir}/bin/ ] || mkdir ${installDir}/bin/
[ -e ${installDir}/include/ ] || mkdir ${installDir}/include/
[ -e ${installDir}/lib/ ] || mkdir ${installDir}/lib/

cp -RH ./bin/protoc ${installDir}/bin/protoc
chmod 777 ${installDir}/bin/protoc

cp -RH ./include/google ${installDir}/include/
chmod -R 777 ${installDir}/include/google

cp -RH ./lib/libproto* ${installDir}/lib/
chmod 777 ${installDir}/lib/libprotobuf*
